<ion-view view-title="我的红包">
	<ion-nav-bar ng-class="baseclass">
		<ion-nav-back-button></ion-nav-back-button>
	</ion-nav-bar>
	
	<div class="bar bar-subheader line-bottom padding-0">
		<div class="row text-center font-large-my">
			<div class="col col-50" on-tap="activeSlide(0)" ng-class="selectIndex==0?'top-activated':''">
				<i class="icon ion-reply font-1rem-my"></i>
				收红包
			</div>
			<div class="col col-50" on-tap="activeSlide(1)" ng-class="selectIndex==1?'top-activated':''">
				发红包
				<i class="icon ion-forward font-1rem-my"></i>
			</div>
		</div>
	</div>


	<ion-side-menus style='top: 44px;'>

		<ion-side-menu-content>

			<ion-content class="scroll-content">
				<ion-slide-box delegate-handle="tab-handle" on-touch="onTouch()" on-release="onRelease()" draw-slide="false" on-slide-changed="slideChanged(index)" active-slide="slideIndex" show-pager="false">
					<!--描述：收红包-->
					<ion-slide>
						
						<li class="item padding assertive">
							共收到红包：{{red_data.confirm_count+red_data.ready_count}}个 / {{red_data.confirm_money+red_data.ready_money}}元
						</li>
						<li class="item padding">
							未收的红包：{{red_data.ready_count}}个 / {{red_data.ready_money}}元
						</li>
						<div class="list" style='margin-bottom: 0;'>
							<li class="item padding item-divider item-input-inset">
									<div class="input-value small" ng-click="doSelectStatus(1)">{{red_data.status_select.name}}</div>
									<div class="input-value small" ng-click="doSelectYear(1)">{{red_data.year_select.text}}</div>
							</li>
						</div>
						<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
							<!--描述：下拉刷新-->
							<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
							<div class="list">
								<div ng-repeat="row in red_data.packets"><!--循环的div-->
									<li class="item padding">
										红包：<span class="assertive">{{row.name}}</span>
										<span class="right-zhang">金额：<span class="assertive">{{row.money}}</span></span>
									</li>
									<li class="item padding item-borderless">
										发放人：{{row.member_name}}
									</li>
									<li class="item padding item-borderless">
										发放时间：{{row.mtime}}
										<span ng-if='row.received_status == "ready"' class="bian_red assertive border-radius-my right-zhang font-large-my" style="padding: 1px 5px;" on-tap="recive_red(row.id)">领取</span>
										<span ng-if='row.received_status == "confirm"' class="assertive border-radius-my right-zhang font-large-my" style="padding: 1px 5px; color: #FFF; background: #AAA;">已领取</span>
										<span ng-if='row.received_status == "return"' class="assertive border-radius-my right-zhang font-large-my" style="padding: 1px 5px; color: #FFF; background: #AAA;">超时未接收</span>
									</li>
								</div><!--循环的div-->
							</div>

							<!--描述：当用户到达页脚或页脚附近时-->
							<ion-infinite-scroll ng-if="!isLoad && !red_data.isend" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
							<div  style='padding-bottom: 50px;'></div>
						</ion-scroll>
					</ion-slide>

					<!--发红包-->
					<ion-slide>
						
						<li class="item padding assertive">
							共发出红包：{{post_data.count}}个 / {{post_data.money}}元
						</li>
						<div class="list" style='margin-bottom: 0;'>
							<li class="item padding item-divider item-input-inset">
									<div class="input-value small" ng-click="doSelectStatus(2)">{{post_data.status_select.name}}</div>
									<div class="input-value small" ng-click="doSelectYear(2)">{{post_data.year_select.text}}</div>
							</li>
						</div>
						<ion-scroll direction="y" ng-style="myObj2" lazy-scroll>
							<!--描述：下拉刷新-->
							<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
							<div class="list">
								<div ng-repeat="row in post_data.packets">
									<li class="item padding">
										红包：<span class="assertive" on-tap="showPopup_red($index)">{{row.name}}</span>
										<span class="right-zhang">金额：<span class="assertive">{{row.money}}</span></span>
									</li>
									<li class="item padding item-borderless">
										发放时间：{{row.mtime}}
										<span ng-if='row.received_status == "ready"' class="assertive border-radius-my right-zhang font-large-my" style='color: #888;'>{{row.status}}</span>
										<span ng-if='row.received_status == "confirm"' class="assertive border-radius-my right-zhang font-large-my" >{{row.status}}</span>
										<span ng-if='row.received_status == "return"' class="assertive border-radius-my right-zhang font-large-my" style='color: #888;'>{{row.status}}</span>
									</li>
								</div>
							</div>
							<!--描述：当用户到达页脚或页脚附近时-->
							<ion-infinite-scroll ng-if="!isLoad && !post_data.isend" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
							<div  style='padding-bottom: 50px;'></div>
						</ion-scroll>
					</ion-slide>	
				</ion-slide-box>
			</ion-content>
		</ion-side-menu-content>
	</ion-side-menus>
</ion-view>